﻿namespace CSharpPro._1030;
public abstract class Father
{
    private int id;

    public Father()
    {
        Console.WriteLine("Father---------Constructor");
    }

    public Father(int id)
    {
        this.id = id;
    }

    public int Id
    {
        get => id;
        set => id = value;
    }
    // 0>Child.cs(5,26): Error CS0506 : “Child.Print()”: 继承成员“Father.Print()”未标记为 virtual、abstract 或 override，无法进行重写
    public virtual void Print()
    {
        Console.WriteLine("Father---------Print");
    }
    
    public abstract void M1();
}